$(function () {
    // 首先获取简历id
    let resumeId = $("#resumeId").val();
    $("#basic_info").load("/hire/resume/basic_info", {id: resumeId});
    $("#job_info").load("/hire/resume/job_info", {id: resumeId});
    $("#edu_info").load("/hire/resume/edu_info", {id: resumeId});
    $("#intern_info").load("/hire/resume/intern_info", {id: resumeId});
    $("#pro_info").load("/hire/resume/project_info", {id: resumeId});
    $("#award_info").load("/hire/resume/award_info", {id: resumeId});
    $("#sum_info").load("/hire/resume/summary_info", {id: resumeId});
})
//添加教育经历
function insertEdu() {
    // console.log("正在执行添加");
    $("#edu_info").load('/hire/resume/education_add');
}
//添加实习经历
function insertIntern(){
    $("#intern_info").load('/hire/resume/intern_add');
}
//添加项目经历
function insertProject() {
    $("#pro_info").load('/hire/resume/project_add');
}
//添加获奖经历
function insertAward() {
    $("#award_info").load('/hire/resume/award_add');

}
function preview_method(){
    let resumeId = $("#resumeId").val();
    window.location = "/hire/resume/resume_preview?resumeId=" + resumeId;
}
function refresh_method(){
    let resumeId = $("#resumeId").val();
    let updateTime = $("#updateTime").val();
    let param = "id=" + resumeId  + "&updateTime=" + updateTime;
    $.post('/hire/resume/refresh/update',param,function (res) {
        if (res.code == '200') {
            layer.msg("刷新成功")
        } else {
            layer.msg("刷新失败")
        }
    })
}
function create_method(){
    $.get('/hire/resume/create/resume',function (res) {
        if(res.code=='200'){
            window.location.href = "/hire/resume/resume_make?resumeId=" + res.data;
        }else if(res.code=='501'){
            layer.msg("简历数量已达到上限，如需继续操作请删除其他简历哦～")
        }
    });
}





